package com.hxzy.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.hxzy.controller.admin.category.req.CategoryClassReq;
import com.hxzy.controller.admin.category.resp.CategoryClassResp;
import com.hxzy.entity.CategoryClass;
import com.hxzy.service.CategoryClassService;
import com.hxzy.mapper.CategoryClassMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
* @author Administrator
* @description 针对表【category_class(商品分类表)】的数据库操作Service实现
* @createDate 2023-06-28 16:38:44
*/
@Service
public class CategoryClassServiceImpl extends ServiceImpl<CategoryClassMapper, CategoryClass>
    implements CategoryClassService{

    @Autowired
    private CategoryClassMapper categoryClassMapper;

    @Override
    public PageInfo<CategoryClassResp> search(CategoryClassReq req) {
        return PageHelper.startPage(req.getPage(),req.getSize())
                .doSelectPageInfo(()-> {
                    categoryClassMapper.search(req);
                });
    }
}




